/*
 * Copyright (c) 2016. For Intelligent Group.
 */

package com.intelligent.mts.client.utils;

import com.intelligent.mts.common.mapper.JsonMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by julia on 16/7/21.
 */
public class MessageUtils {

    public static Logger logger = LoggerFactory.getLogger(MessageUtils.class);

    private static JsonMapper mapper = JsonMapper.nonDefaultMapper();

    public static List<ProcessMessage> getProcessMessage() {
        SystemConfig systemConfig = ApplicationBeanUtils.getBean(SystemConfig.class);
        List<ProcessMessage> processMessageList = mapper.fromJson(systemConfig.getFlow(), mapper.contructCollectionType(List.class, ProcessMessage.class));
        return processMessageList;
    }

}
